class User < ActiveRecord::Base
    validates_presence_of:name,:password
    validates_confirmation_of:password
    validates_uniqueness_of :name
has_many :articles,:order=>"created_at DESC"
end
